package com.winhxd.b2c.customer.dao;

import com.winhxd.b2c.common.domain.customer.condition.CustomerIntegralDetailCondition;
import com.winhxd.b2c.common.domain.customer.model.CustomerIntegralDetail;
import com.winhxd.b2c.common.domain.customer.vo.CustomerIntegralDetailVO;
import org.apache.ibatis.annotations.Param;
import com.winhxd.b2c.common.domain.customer.vo.CustomerMyIntegralListVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author caiyulong
 */
@Repository
public interface CustomerIntegralDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CustomerIntegralDetail record);

    int insertSelective(CustomerIntegralDetail record);

    CustomerIntegralDetail selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CustomerIntegralDetail record);

    int updateByPrimaryKey(CustomerIntegralDetail record);

    /**
     * 分销商/会员详情-积分日志
     * @author: wangbaokuo
     * @date: 2019/1/11 14:09
     * @param:
     * @return:
     */
    List<CustomerIntegralDetailVO> getUserIntegralDetail(CustomerIntegralDetailCondition condition);

    void batchInsert(@Param("customerIntegralDetails") List<CustomerIntegralDetail> customerIntegralDetails);

    /**
     * 我的积分列表
     *
     * @param customerId
     * @return
     */
    List<CustomerMyIntegralListVO> getMyIntegralList(Long customerId);

}